package com.henanuniversity.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.henanuniversity.dao.FoodDao;
import com.henanuniversity.dao.impl.FoodDaoImpl;
import com.henanuniversity.po.Food;
import com.henanuniversity.service.FoodService;
import com.henanuniversity.utils.DBUtils;


public class FoodServiceImpl implements FoodService {

	@Override
	public List<Food> listFoodByBusinessId(Integer businessId) {
		List<Food> list = new ArrayList<>();
		FoodDao dao = new FoodDaoImpl();
		try {
			DBUtils.getConnection();
			list = dao.listFoodByBusinessId(businessId);
		}catch (Exception e) {
			e.printStackTrace();
		}finally {
			DBUtils.close();
		}
		return list;
	}
}
